﻿using Microsoft.CodeAnalysis.Operations;
using NPOI.Util;
using SmartPlant.Model.Biz;
using SmartPlant.Services.Interfaces;
using SmartPlant.WinCore;
using System.Collections.Generic;
using System.Threading.Tasks;
using static System.Formats.Asn1.AsnWriter;

namespace SmartPlant.Services
{
    public class PlantGroupService : BaseService, IPlantGroupService
    { 
        /// <summary>
        /// pbs结构
        /// </summary>
        /// <param name="proId"></param>
        /// <returns></returns>
        public async Task<List<Plant>> GetPlantGroupTreeAsync(string proId)
        {
            string uri = $"/api/Project/{proId}/plant-group-api";
            var res = await GetAsync<List<Plant>>(uri);
            return res.data;
        }

    }
}